package com.zhangtai.modules.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.zhangtai.config.LongJsonDeserializer;
import com.zhangtai.config.LongJsonSerializer;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.regex.Pattern;

@Data
public class EmployeeSalaryGroupDto implements Serializable {

    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long id;

    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long oid;
    /**
     * 姓名
     */
    private String name;

    /**
     * 工号
     */
    private String code;

    /**
     * 拟录用公司
     */
    private String orgname;

    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long orgId;

    /**
     * 拟录用部门
     */
    private String unitname;
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long unitId;


    /**
     * 拟录用岗位
     */
    private String jobname;


    /**
     * 拟录用岗位
     */
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long jobId;

    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long salaryGroupId;

    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long oidSalaryGroupId;

    /**
     * 发薪单位id
     */
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long payrollUnitId;

    /**
     * 旧发薪单位id
     */
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long oidPayrollUnitId;




//分配日期
    private Date distributionTime;


    /**
     *变动类型   0专业晋级/1管理晋级/2试用转正/3入职定薪/4降级调薪/5薪资调整
     */
    private Integer type;

    private SalaryGroupDto salaryGroupDto;

    private SalaryGroupDto oidSalaryGroupDto;

    private SalaryPayrollUnitDto salaryUnitDto;

    private SalaryPayrollUnitDto oidSalaryUnitDto;


    /**
     * 分配人
     */
    private String distributionName;


    /**
     * 分配人
     */

    @JsonFormat(pattern = "yyyy-MM")
    private Date createTime;

    /**
     * 入职日期
     */
    private Date hiredate;

}
